<template>
  <div>
    <van-card
      v-for="item in arr" :key="item.id"
      :price="item.price"
      :title="item.goodsname"
      :num="item.num"
      :thumb="$pre+item.img"
    >
    </van-card>
  </div>
</template>

<script>
import { reqGetShop } from '../../../http/api';
export default {
  data(){
    return {
      arr:[]
    }
  },
  mounted(){
    let idstr=JSON.parse(sessionStorage.getItem("orderInfo")).idstr;
    let idArr=idstr.split(",")
    idArr.forEach(item=>{
      reqGetShop({
        uid:JSON.parse(localStorage.getItem("isLogin")).uid,
        id:item
      }).then(res=>{
        if(res.data.code==200){
          this.arr.push(res.data.list[0])
        }
      })
    })
  }
};
</script>

<style lang="less">
@import "../../../less/index.less";
</style>